export default {
    // 设置是否全屏
    isFullScreenSetter (state, params) {
        state.isFullScreen = !!params
    },
    // 设置页面缓存列表
    keepAliveListSetter (state, params) {
        params = params || {}
        let type = params.type
        let routeName = params.routeName
        if (type === 'add') {
            if (!state.keepAliveList.includes(routeName)) state.keepAliveList.push(routeName)
        } else if (type === 'remove') {
            state.keepAliveList = state.keepAliveList.filter(v => v !== routeName)
        } else if (type === 'clear') {
           state.keepAliveList = []
        }
    }
}
